3.1.7 \(\int \csc ^3(c+d x) (a+a \sec (c+d x)) \, dx\) [7]

Optimal. Leaf size=73 \[ -\frac {a^2}{2 d (a-a \cos (c+d x))}+\frac {3 a \log (1-\cos (c+d x))}{4 d}-\frac {a \log (\cos (c+d x))}{d}+\frac {a \log (1+\cos (c+d x))}{4 d} \]

[Out]

-1/2*a^2/d/(a-a*cos(d*x+c))+3/4*a*ln(1-cos(d*x+c))/d-a*ln(cos(d*x+c))/d+1/4*a*ln(1+cos(d*x+c))/d

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3957, 2915, 12, 84} \begin {gather*} -\frac {a^2}{2 d (a-a \cos (c+d x))}+\frac {3 a \log (1-\cos (c+d x))}{4 d}-\frac {a \log (\cos (c+d x))}{d}+\frac {a \log (\cos (c+d x)+1)}{4 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^3*(a + a*Sec[c + d*x]),x]

[Out]

-1/2*a^2/(d*(a - a*Cos[c + d*x])) + (3*a*Log[1 - Cos[c + d*x]])/(4*d) - (a*Log[Cos[c + d*x]])/d + (a*Log[1 + C
os[c + d*x]])/(4*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 84

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 2915

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps

\begin {align*} \int \csc ^3(c+d x) (a+a \sec (c+d x)) \, dx &=-\int (-a-a \cos (c+d x)) \csc ^3(c+d x) \sec (c+d x) \, dx\\ &=\frac {a^3 \text {Subst}\left (\int \frac {a}{(-a-x)^2 x (-a+x)} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {a^4 \text {Subst}\left (\int \frac {1}{(-a-x)^2 x (-a+x)} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {a^4 \text {Subst}\left (\int \left (-\frac {1}{4 a^3 (a-x)}-\frac {1}{a^3 x}+\frac {1}{2 a^2 (a+x)^2}+\frac {3}{4 a^3 (a+x)}\right ) \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=-\frac {a^2}{2 d (a-a \cos (c+d x))}+\frac {3 a \log (1-\cos (c+d x))}{4 d}-\frac {a \log (\cos (c+d x))}{d}+\frac {a \log (1+\cos (c+d x))}{4 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.55, size = 114, normalized size = 1.56 \begin {gather*} -\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}-\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}-\frac {a \left (\csc ^2(c+d x)+2 \log (\cos (c+d x))-2 \log (\sin (c+d x))\right )}{2 d}+\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^3*(a + a*Sec[c + d*x]),x]

[Out]

-1/8*(a*Csc[(c + d*x)/2]^2)/d - (a*Log[Cos[(c + d*x)/2]])/(2*d) + (a*Log[Sin[(c + d*x)/2]])/(2*d) - (a*(Csc[c
+ d*x]^2 + 2*Log[Cos[c + d*x]] - 2*Log[Sin[c + d*x]]))/(2*d) + (a*Sec[(c + d*x)/2]^2)/(8*d)

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 41, normalized size = 0.56

method result size
derivativedivides \(\frac {a \left (-\frac {1}{2 \left (-1+\sec \left (d x +c \right )\right )}+\frac {3 \ln \left (-1+\sec \left (d x +c \right )\right )}{4}+\frac {\ln \left (1+\sec \left (d x +c \right )\right )}{4}\right )}{d}\) \(41\)
default \(\frac {a \left (-\frac {1}{2 \left (-1+\sec \left (d x +c \right )\right )}+\frac {3 \ln \left (-1+\sec \left (d x +c \right )\right )}{4}+\frac {\ln \left (1+\sec \left (d x +c \right )\right )}{4}\right )}{d}\) \(41\)
norman \(-\frac {a}{4 d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) \(71\)
risch \(\frac {a \,{\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{2}}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) \(83\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^3*(a+a*sec(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*a*(-1/2/(-1+sec(d*x+c))+3/4*ln(-1+sec(d*x+c))+1/4*ln(1+sec(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 52, normalized size = 0.71 \begin {gather*} \frac {a \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, a \log \left (\cos \left (d x + c\right ) - 1\right ) - 4 \, a \log \left (\cos \left (d x + c\right )\right ) + \frac {2 \, a}{\cos \left (d x + c\right ) - 1}}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^3*(a+a*sec(d*x+c)),x, algorithm="maxima")

[Out]

1/4*(a*log(cos(d*x + c) + 1) + 3*a*log(cos(d*x + c) - 1) - 4*a*log(cos(d*x + c)) + 2*a/(cos(d*x + c) - 1))/d

________________________________________________________________________________________

Fricas [A]
time = 2.89, size = 93, normalized size = 1.27 \begin {gather*} -\frac {4 \, {\left (a \cos \left (d x + c\right ) - a\right )} \log \left (-\cos \left (d x + c\right )\right ) - {\left (a \cos \left (d x + c\right ) - a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, {\left (a \cos \left (d x + c\right ) - a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, a}{4 \, {\left (d \cos \left (d x + c\right ) - d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^3*(a+a*sec(d*x+c)),x, algorithm="fricas")

[Out]

-1/4*(4*(a*cos(d*x + c) - a)*log(-cos(d*x + c)) - (a*cos(d*x + c) - a)*log(1/2*cos(d*x + c) + 1/2) - 3*(a*cos(
d*x + c) - a)*log(-1/2*cos(d*x + c) + 1/2) - 2*a)/(d*cos(d*x + c) - d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \csc ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \csc ^{3}{\left (c + d x \right )}\, dx\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**3*(a+a*sec(d*x+c)),x)

[Out]

a*(Integral(csc(c + d*x)**3*sec(c + d*x), x) + Integral(csc(c + d*x)**3, x))

________________________________________________________________________________________

Giac [A]
time = 0.45, size = 102, normalized size = 1.40 \begin {gather*} \frac {3 \, a \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 4 \, a \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) + \frac {{\left (a - \frac {3 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}{\cos \left (d x + c\right ) - 1}}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^3*(a+a*sec(d*x+c)),x, algorithm="giac")

[Out]

1/4*(3*a*log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1)) - 4*a*log(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1
) - 1)) + (a - 3*a*(cos(d*x + c) - 1)/(cos(d*x + c) + 1))*(cos(d*x + c) + 1)/(cos(d*x + c) - 1))/d

________________________________________________________________________________________

Mupad [B]
time = 0.96, size = 53, normalized size = 0.73 \begin {gather*} \frac {\frac {a}{2\,\left (\cos \left (c+d\,x\right )-1\right )}-a\,\ln \left (\cos \left (c+d\,x\right )\right )+\frac {3\,a\,\ln \left (\cos \left (c+d\,x\right )-1\right )}{4}+\frac {a\,\ln \left (\cos \left (c+d\,x\right )+1\right )}{4}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(c + d*x))/sin(c + d*x)^3,x)

[Out]

(a/(2*(cos(c + d*x) - 1)) - a*log(cos(c + d*x)) + (3*a*log(cos(c + d*x) - 1))/4 + (a*log(cos(c + d*x) + 1))/4)
/d

________________________________________________________________________________________